import Game from "./Game";
import GameStorage from "./GameStorage";
import GlobalData from "../db/GlobalData";
import HeroVO from "../db/vo/HeroVO";




export default class GameCheat {



    cheat() {
        this.setLevel(30);
    }


    setLevel(level) {
        console.log("GameCheat setLevel..")
        // Game.gameStage.stageData.curLevel=level;
        let heroVO: HeroVO = GlobalData.getData(GlobalData.HeroVO, level);
        Game.hero.playerData.mapLevel = level;
        Game.hero.playerData.attackLv = level;
        Game.hero.playerData.gold = 0;
        Game.hero.playerData.diamond = 0;
        Game.hero.playerData.attackSpeedLv = 1;
        Game.hero.playerData.hpLv = 1;
        GameStorage.saveStorage();
    }

}